package com.woniuxy.repay.service;

import com.woniuxy.entity.RepaymentProtection;
import com.woniuxy.entity.RepaymentRegistration;
import com.woniuxy.repay.entity.PageBean;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

/**
 * @author shichen
 * @create 2021-11-21-20:37
 * @description
 */
@CacheConfig(cacheNames = "repaymentRegistration")
public interface RepaymentRegistrationService {



    /**
     * 条件查询
     *
     * @param repaymentRegistration
     * @param pageIndex
     * @return
     */
    @Cacheable(key = "#repaymentRegistration +'CurrentPage'+ #pageIndex")
    public PageBean selectByCondition(RepaymentRegistration repaymentRegistration, Integer pageIndex);

    /**
     * 更新
     *
     * @param repaymentRegistration
     */
    @CacheEvict(allEntries = true)
    public void updateByCondition(RepaymentRegistration repaymentRegistration);

    /**
     * 插入消息
     *
     * @param repaymentRegistration
     */
    @CacheEvict(allEntries = true)
    public void insert(RepaymentRegistration repaymentRegistration);
}
